#!/bin/bash

number=7

input () {
	if [[ "" == $1 ]] ; then
		read `echo $1`
	fi
}
echo $(( numbe )) $(( "" ))

if [[ "-h" == $1 || "--help" == $1 ]] ; then
	cat ~/sis/help/lucky-test.help
	
	exit 2
elif [[ "-n" == $1 ]] ; then
	number=$2
	if [[ "" == $number ]] ; then
		echo "please: -n <number>"
		exit 3
	fi
	
	answer=$3
else
	answer=$1
fi

# export answer
input answer

random=$(( RANDOM % number ))

if [[ $random == $answer ]] ; then
    echo Winer!
else
	echo Loser!
fi
